// Image Loader
// (c) jimon game studio

#ifndef JEH_CIMAGELOADER
#define JEH_CIMAGELOADER

#include "jeUnknown.h"
#include "jeStl.h"
#include "IImageLoader.h"

#define JE_SUPPORT_FILEFORMAT_PNG

namespace je
{
	namespace video
	{
		//! Image Loader
		class CImageLoader:public je::video::IImageLoader
		{
		private:
			//! Loaders List Type
			typedef je::jeList<IImageFormatLoader*> ImageLoadersList;

			//! Loaders List
			ImageLoadersList * Loaders;
		public:
			//! Constructor
			CImageLoader();

			//! Destructor
			~CImageLoader();

			//! Load Image
			IImage * LoadImage(core::IBuffer * DataBuffer);

			//! Save Image
			void SaveImage(core::IBuffer * Buffer,IImage * Image,ImageFormat Format);

			//! Register Format Loader
			void RegisterFormatLoader(IImageFormatLoader * FormatLoader);

			//! UnRegister Format Loader
			void UnRegisterFormatLoader(IImageFormatLoader * FormatLoader);

			//! Get Format Loader
			IImageFormatLoader * GetFormatLoader(ImageFormat Format);
		};
	}
}

#endif
